package com.demo.drools.dal.orm;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author ZhouSicheng
 * @description
 * @date 2019/3/15 14:50
 */
@Data
public abstract class BaseEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    protected Long id;

    @TableField(value = "create_time", fill = FieldFill.UPDATE)
    @JSONField(serialize = false)
    protected Date createTime = new Date();

    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @JSONField(serialize = false)
    protected Date updateTime;

}
